<template>
  <div id="app">
    <div class="bor">
      <Bander/>
      <div class="row">
        <div class="row-a">
          <!-- <a class="link" href="">About</a>
          <a class="link" href="">Home</a> -->
          
          <!-- vue中借助router-link标签实现路由路径切换 （最终也会转成a标签） -->
          <router-link class="link" active-class="active" to="/about">About</router-link>
          <router-link class="link" active-class="active" to="/home">Home</router-link>
        </div>
        
        <div class="row-content">
          <!-- 指定组件de呈现 -->
          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>
 
</template>

<script>
import Bander from './components/Bander.vue'
// import Home from './components/Home.vue'

export default {
  name: 'App',
  components:{Bander},
}
</script>

<style>
  .bor{
    margin: auto;
    /* background-color: violet; */
    width: 500px;
    height: 500px;
    border: 1px solid black;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
  }
  .row{
    display: flex;
    border-top: 1px solid black;
    width: 500px;
    height: 500px;
  }
  .row-a{
    display: flex;
    flex-direction:column;
    margin-right: 20px;
  }
  .link{
    display: block;
    width: 100px;
    height: 50px;
    background:cornsilk;
    margin-top: 10px;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    border-radius: 5px;
  }
  .active{
    background-color:dodgerblue ;
    color: white;
  }
  
</style>
